3.1.17 \(\int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx\) [17]

3.1.17.1 Optimal result
3.1.17.2 Mathematica [A] (verified)
3.1.17.3 Rubi [A] (verified)
3.1.17.4 Maple [B] (verified)
3.1.17.5 Fricas [B] (verification not implemented)
3.1.17.6 Sympy [B] (verification not implemented)
3.1.17.7 Maxima [B] (verification not implemented)
3.1.17.8 Giac [B] (verification not implemented)
3.1.17.9 Mupad [B] (verification not implemented)

3.1.17.1 Optimal result

Integrand size = 21, antiderivative size = 95 \[ \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx=a b e x+\frac {b^2 e (c+d x) \text {arctanh}(c+d x)}{d}-\frac {e (a+b \text {arctanh}(c+d x))^2}{2 d}+\frac {e (c+d x)^2 (a+b \text {arctanh}(c+d x))^2}{2 d}+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d} \]

output
a*b*e*x+b^2*e*(d*x+c)*arctanh(d*x+c)/d-1/2*e*(a+b*arctanh(d*x+c))^2/d+1/2* 
e*(d*x+c)^2*(a+b*arctanh(d*x+c))^2/d+1/2*b^2*e*ln(1-(d*x+c)^2)/d
 
3.1.17.2 Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.41 \[ \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx=e \left (\frac {a b (c+d x)}{d}+\frac {a^2 (c+d x)^2}{2 d}+\frac {b (c+d x) (b+a (c+d x)) \text {arctanh}(c+d x)}{d}+\frac {\left (-b^2+b^2 (c+d x)^2\right ) \text {arctanh}(c+d x)^2}{2 d}+\frac {\left (a b+b^2\right ) \log (1-c-d x)}{2 d}+\frac {\left (-a b+b^2\right ) \log (1+c+d x)}{2 d}\right ) \]

input
Integrate[(c*e + d*e*x)*(a + b*ArcTanh[c + d*x])^2,x]
 
output
e*((a*b*(c + d*x))/d + (a^2*(c + d*x)^2)/(2*d) + (b*(c + d*x)*(b + a*(c + 
d*x))*ArcTanh[c + d*x])/d + ((-b^2 + b^2*(c + d*x)^2)*ArcTanh[c + d*x]^2)/ 
(2*d) + ((a*b + b^2)*Log[1 - c - d*x])/(2*d) + ((-(a*b) + b^2)*Log[1 + c + 
 d*x])/(2*d))
 
3.1.17.3 Rubi [A] (verified)

Time = 0.51 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6657, 27, 6452, 6542, 2009, 6510}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx\)

\(\Big \downarrow \) 6657

\(\displaystyle \frac {\int e (c+d x) (a+b \text {arctanh}(c+d x))^2d(c+d x)}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {e \int (c+d x) (a+b \text {arctanh}(c+d x))^2d(c+d x)}{d}\)

\(\Big \downarrow \) 6452

\(\displaystyle \frac {e \left (\frac {1}{2} (c+d x)^2 (a+b \text {arctanh}(c+d x))^2-b \int \frac {(c+d x)^2 (a+b \text {arctanh}(c+d x))}{1-(c+d x)^2}d(c+d x)\right )}{d}\)

\(\Big \downarrow \) 6542

\(\displaystyle \frac {e \left (\frac {1}{2} (c+d x)^2 (a+b \text {arctanh}(c+d x))^2-b \left (\int \frac {a+b \text {arctanh}(c+d x)}{1-(c+d x)^2}d(c+d x)-\int (a+b \text {arctanh}(c+d x))d(c+d x)\right )\right )}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {e \left (\frac {1}{2} (c+d x)^2 (a+b \text {arctanh}(c+d x))^2-b \left (\int \frac {a+b \text {arctanh}(c+d x)}{1-(c+d x)^2}d(c+d x)-a (c+d x)-b (c+d x) \text {arctanh}(c+d x)-\frac {1}{2} b \log \left (1-(c+d x)^2\right )\right )\right )}{d}\)

\(\Big \downarrow \) 6510

\(\displaystyle \frac {e \left (\frac {1}{2} (c+d x)^2 (a+b \text {arctanh}(c+d x))^2-b \left (\frac {(a+b \text {arctanh}(c+d x))^2}{2 b}-a (c+d x)-b (c+d x) \text {arctanh}(c+d x)-\frac {1}{2} b \log \left (1-(c+d x)^2\right )\right )\right )}{d}\)

input
Int[(c*e + d*e*x)*(a + b*ArcTanh[c + d*x])^2,x]
 
output
(e*(((c + d*x)^2*(a + b*ArcTanh[c + d*x])^2)/2 - b*(-(a*(c + d*x)) - b*(c 
+ d*x)*ArcTanh[c + d*x] + (a + b*ArcTanh[c + d*x])^2/(2*b) - (b*Log[1 - (c 
 + d*x)^2])/2)))/d
 

3.1.17.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 6452
Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] : 
> Simp[x^(m + 1)*((a + b*ArcTanh[c*x^n])^p/(m + 1)), x] - Simp[b*c*n*(p/(m 
+ 1))   Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x 
], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1 
] && IntegerQ[m])) && NeQ[m, -1]
 

rule 6510
Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symb 
ol] :> Simp[(a + b*ArcTanh[c*x])^(p + 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b 
, c, d, e, p}, x] && EqQ[c^2*d + e, 0] && NeQ[p, -1]
 

rule 6542
Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + ( 
e_.)*(x_)^2), x_Symbol] :> Simp[f^2/e   Int[(f*x)^(m - 2)*(a + b*ArcTanh[c* 
x])^p, x], x] - Simp[d*(f^2/e)   Int[(f*x)^(m - 2)*((a + b*ArcTanh[c*x])^p/ 
(d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 
 1]
 

rule 6657
Int[((a_.) + ArcTanh[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^( 
m_.), x_Symbol] :> Simp[1/d   Subst[Int[(f*(x/d))^m*(a + b*ArcTanh[x])^p, x 
], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f, 0] 
&& IGtQ[p, 0]
 
3.1.17.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(220\) vs. \(2(89)=178\).

Time = 0.14 (sec) , antiderivative size = 221, normalized size of antiderivative = 2.33

method result size
derivativedivides \(\frac {\frac {e \,a^{2} \left (d x +c \right )^{2}}{2}+e \,b^{2} \left (\frac {\left (d x +c \right )^{2} \operatorname {arctanh}\left (d x +c \right )^{2}}{2}+\left (d x +c \right ) \operatorname {arctanh}\left (d x +c \right )+\frac {\operatorname {arctanh}\left (d x +c \right ) \ln \left (d x +c -1\right )}{2}-\frac {\operatorname {arctanh}\left (d x +c \right ) \ln \left (d x +c +1\right )}{2}-\frac {\ln \left (d x +c -1\right ) \ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (d x +c -1\right )^{2}}{8}+\frac {\ln \left (d x +c -1\right )}{2}+\frac {\ln \left (d x +c +1\right )}{2}+\frac {\ln \left (d x +c +1\right )^{2}}{8}-\frac {\left (\ln \left (d x +c +1\right )-\ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right )}{4}\right )+2 e a b \left (\frac {\left (d x +c \right )^{2} \operatorname {arctanh}\left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}+\frac {\ln \left (d x +c -1\right )}{4}-\frac {\ln \left (d x +c +1\right )}{4}\right )}{d}\) \(221\)
default \(\frac {\frac {e \,a^{2} \left (d x +c \right )^{2}}{2}+e \,b^{2} \left (\frac {\left (d x +c \right )^{2} \operatorname {arctanh}\left (d x +c \right )^{2}}{2}+\left (d x +c \right ) \operatorname {arctanh}\left (d x +c \right )+\frac {\operatorname {arctanh}\left (d x +c \right ) \ln \left (d x +c -1\right )}{2}-\frac {\operatorname {arctanh}\left (d x +c \right ) \ln \left (d x +c +1\right )}{2}-\frac {\ln \left (d x +c -1\right ) \ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (d x +c -1\right )^{2}}{8}+\frac {\ln \left (d x +c -1\right )}{2}+\frac {\ln \left (d x +c +1\right )}{2}+\frac {\ln \left (d x +c +1\right )^{2}}{8}-\frac {\left (\ln \left (d x +c +1\right )-\ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right )}{4}\right )+2 e a b \left (\frac {\left (d x +c \right )^{2} \operatorname {arctanh}\left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}+\frac {\ln \left (d x +c -1\right )}{4}-\frac {\ln \left (d x +c +1\right )}{4}\right )}{d}\) \(221\)
parts \(e \,a^{2} \left (\frac {1}{2} d \,x^{2}+c x \right )+\frac {e \,b^{2} \left (\frac {\left (d x +c \right )^{2} \operatorname {arctanh}\left (d x +c \right )^{2}}{2}+\left (d x +c \right ) \operatorname {arctanh}\left (d x +c \right )+\frac {\operatorname {arctanh}\left (d x +c \right ) \ln \left (d x +c -1\right )}{2}-\frac {\operatorname {arctanh}\left (d x +c \right ) \ln \left (d x +c +1\right )}{2}-\frac {\ln \left (d x +c -1\right ) \ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )}{4}+\frac {\ln \left (d x +c -1\right )^{2}}{8}+\frac {\ln \left (d x +c -1\right )}{2}+\frac {\ln \left (d x +c +1\right )}{2}+\frac {\ln \left (d x +c +1\right )^{2}}{8}-\frac {\left (\ln \left (d x +c +1\right )-\ln \left (\frac {d x}{2}+\frac {c}{2}+\frac {1}{2}\right )\right ) \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right )}{4}\right )}{d}+\frac {2 e a b \left (\frac {\left (d x +c \right )^{2} \operatorname {arctanh}\left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}+\frac {\ln \left (d x +c -1\right )}{4}-\frac {\ln \left (d x +c +1\right )}{4}\right )}{d}\) \(225\)
parallelrisch \(\frac {d^{3} e \,b^{2} x^{2} \operatorname {arctanh}\left (d x +c \right )^{2}+2 x^{2} \operatorname {arctanh}\left (d x +c \right ) a b \,d^{3} e +2 c e \,b^{2} x \operatorname {arctanh}\left (d x +c \right )^{2} d^{2}+x^{2} a^{2} d^{3} e +4 x \,\operatorname {arctanh}\left (d x +c \right ) a b c \,d^{2} e +\operatorname {arctanh}\left (d x +c \right )^{2} b^{2} c^{2} d e +2 x \,\operatorname {arctanh}\left (d x +c \right ) b^{2} d^{2} e +2 x \,a^{2} c \,d^{2} e +2 \,\operatorname {arctanh}\left (d x +c \right ) a b \,c^{2} d e +2 x a b \,d^{2} e -e \,b^{2} \operatorname {arctanh}\left (d x +c \right )^{2} d +2 \,\operatorname {arctanh}\left (d x +c \right ) b^{2} c d e -5 a^{2} c^{2} d e +2 \ln \left (d x +c -1\right ) b^{2} d e -2 \,\operatorname {arctanh}\left (d x +c \right ) a b d e +2 \,\operatorname {arctanh}\left (d x +c \right ) b^{2} d e -4 a b c d e +d e \,a^{2}}{2 d^{2}}\) \(248\)
risch \(\frac {e \,b^{2} \left (d^{2} x^{2}+2 c d x +c^{2}-1\right ) \ln \left (d x +c +1\right )^{2}}{8 d}+\frac {b e \left (-b \,d^{2} x^{2} \ln \left (-d x -c +1\right )+2 a \,d^{2} x^{2}-2 b c d x \ln \left (-d x -c +1\right )+4 a c d x -\ln \left (-d x -c +1\right ) b \,c^{2}+2 b d x +b \ln \left (-d x -c +1\right )\right ) \ln \left (d x +c +1\right )}{4 d}+\frac {e d \,b^{2} x^{2} \ln \left (-d x -c +1\right )^{2}}{8}+\frac {e \,b^{2} c x \ln \left (-d x -c +1\right )^{2}}{4}-\frac {e d a b \,x^{2} \ln \left (-d x -c +1\right )}{2}+\frac {e \,b^{2} c^{2} \ln \left (-d x -c +1\right )^{2}}{8 d}-e a b c x \ln \left (-d x -c +1\right )+\frac {e d \,a^{2} x^{2}}{2}-\frac {e \,b^{2} x \ln \left (-d x -c +1\right )}{2}+\frac {e \ln \left (-d x -c -1\right ) a b \,c^{2}}{2 d}-\frac {e \ln \left (d x +c -1\right ) a b \,c^{2}}{2 d}+e \,a^{2} c x -\frac {e \,b^{2} \ln \left (-d x -c +1\right )^{2}}{8 d}+\frac {e \ln \left (-d x -c -1\right ) b^{2} c}{2 d}-\frac {e \ln \left (d x +c -1\right ) b^{2} c}{2 d}+a b e x -\frac {e \ln \left (-d x -c -1\right ) a b}{2 d}+\frac {e \ln \left (-d x -c -1\right ) b^{2}}{2 d}+\frac {e \ln \left (d x +c -1\right ) a b}{2 d}+\frac {e \ln \left (d x +c -1\right ) b^{2}}{2 d}\) \(441\)

input
int((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x,method=_RETURNVERBOSE)
 
output
1/d*(1/2*e*a^2*(d*x+c)^2+e*b^2*(1/2*(d*x+c)^2*arctanh(d*x+c)^2+(d*x+c)*arc 
tanh(d*x+c)+1/2*arctanh(d*x+c)*ln(d*x+c-1)-1/2*arctanh(d*x+c)*ln(d*x+c+1)- 
1/4*ln(d*x+c-1)*ln(1/2*d*x+1/2*c+1/2)+1/8*ln(d*x+c-1)^2+1/2*ln(d*x+c-1)+1/ 
2*ln(d*x+c+1)+1/8*ln(d*x+c+1)^2-1/4*(ln(d*x+c+1)-ln(1/2*d*x+1/2*c+1/2))*ln 
(-1/2*d*x-1/2*c+1/2))+2*e*a*b*(1/2*(d*x+c)^2*arctanh(d*x+c)+1/2*d*x+1/2*c+ 
1/4*ln(d*x+c-1)-1/4*ln(d*x+c+1)))
 
3.1.17.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 191 vs. \(2 (89) = 178\).

Time = 0.27 (sec) , antiderivative size = 191, normalized size of antiderivative = 2.01 \[ \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx=\frac {4 \, a^{2} d^{2} e x^{2} + 8 \, {\left (a^{2} c + a b\right )} d e x + 4 \, {\left (a b c^{2} + b^{2} c - a b + b^{2}\right )} e \log \left (d x + c + 1\right ) - 4 \, {\left (a b c^{2} + b^{2} c - a b - b^{2}\right )} e \log \left (d x + c - 1\right ) + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (b^{2} c^{2} - b^{2}\right )} e\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2} + 4 \, {\left (a b d^{2} e x^{2} + {\left (2 \, a b c + b^{2}\right )} d e x\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{8 \, d} \]

input
integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="fricas")
 
output
1/8*(4*a^2*d^2*e*x^2 + 8*(a^2*c + a*b)*d*e*x + 4*(a*b*c^2 + b^2*c - a*b + 
b^2)*e*log(d*x + c + 1) - 4*(a*b*c^2 + b^2*c - a*b - b^2)*e*log(d*x + c - 
1) + (b^2*d^2*e*x^2 + 2*b^2*c*d*e*x + (b^2*c^2 - b^2)*e)*log(-(d*x + c + 1 
)/(d*x + c - 1))^2 + 4*(a*b*d^2*e*x^2 + (2*a*b*c + b^2)*d*e*x)*log(-(d*x + 
 c + 1)/(d*x + c - 1)))/d
 
3.1.17.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (83) = 166\).

Time = 0.42 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.51 \[ \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx=\begin {cases} a^{2} c e x + \frac {a^{2} d e x^{2}}{2} + \frac {a b c^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} + 2 a b c e x \operatorname {atanh}{\left (c + d x \right )} + a b d e x^{2} \operatorname {atanh}{\left (c + d x \right )} + a b e x - \frac {a b e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} c^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} + b^{2} c e x \operatorname {atanh}^{2}{\left (c + d x \right )} + \frac {b^{2} c e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} d e x^{2} \operatorname {atanh}^{2}{\left (c + d x \right )}}{2} + b^{2} e x \operatorname {atanh}{\left (c + d x \right )} + \frac {b^{2} e \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d} - \frac {b^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} - \frac {b^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\c e x \left (a + b \operatorname {atanh}{\left (c \right )}\right )^{2} & \text {otherwise} \end {cases} \]

input
integrate((d*e*x+c*e)*(a+b*atanh(d*x+c))**2,x)
 
output
Piecewise((a**2*c*e*x + a**2*d*e*x**2/2 + a*b*c**2*e*atanh(c + d*x)/d + 2* 
a*b*c*e*x*atanh(c + d*x) + a*b*d*e*x**2*atanh(c + d*x) + a*b*e*x - a*b*e*a 
tanh(c + d*x)/d + b**2*c**2*e*atanh(c + d*x)**2/(2*d) + b**2*c*e*x*atanh(c 
 + d*x)**2 + b**2*c*e*atanh(c + d*x)/d + b**2*d*e*x**2*atanh(c + d*x)**2/2 
 + b**2*e*x*atanh(c + d*x) + b**2*e*log(c/d + x + 1/d)/d - b**2*e*atanh(c 
+ d*x)**2/(2*d) - b**2*e*atanh(c + d*x)/d, Ne(d, 0)), (c*e*x*(a + b*atanh( 
c))**2, True))
 
3.1.17.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 316 vs. \(2 (89) = 178\).

Time = 0.40 (sec) , antiderivative size = 316, normalized size of antiderivative = 3.33 \[ \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx=\frac {1}{2} \, a^{2} d e x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} a b d e + a^{2} c e x + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} a b c e}{d} + \frac {{\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (d x + c + 1\right )^{2} + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (-d x - c + 1\right )^{2} + 4 \, {\left (b^{2} d e x + {\left (c e + e\right )} b^{2}\right )} \log \left (d x + c + 1\right ) - 2 \, {\left (2 \, b^{2} d e x + 2 \, {\left (c e - e\right )} b^{2} + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (d x + c + 1\right )\right )} \log \left (-d x - c + 1\right )}{8 \, d} \]

input
integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="maxima")
 
output
1/2*a^2*d*e*x^2 + 1/2*(2*x^2*arctanh(d*x + c) + d*(2*x/d^2 - (c^2 + 2*c + 
1)*log(d*x + c + 1)/d^3 + (c^2 - 2*c + 1)*log(d*x + c - 1)/d^3))*a*b*d*e + 
 a^2*c*e*x + (2*(d*x + c)*arctanh(d*x + c) + log(-(d*x + c)^2 + 1))*a*b*c* 
e/d + 1/8*((b^2*d^2*e*x^2 + 2*b^2*c*d*e*x + (c^2*e - e)*b^2)*log(d*x + c + 
 1)^2 + (b^2*d^2*e*x^2 + 2*b^2*c*d*e*x + (c^2*e - e)*b^2)*log(-d*x - c + 1 
)^2 + 4*(b^2*d*e*x + (c*e + e)*b^2)*log(d*x + c + 1) - 2*(2*b^2*d*e*x + 2* 
(c*e - e)*b^2 + (b^2*d^2*e*x^2 + 2*b^2*c*d*e*x + (c^2*e - e)*b^2)*log(d*x 
+ c + 1))*log(-d*x - c + 1))/d
 
3.1.17.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 351 vs. \(2 (89) = 178\).

Time = 0.29 (sec) , antiderivative size = 351, normalized size of antiderivative = 3.69 \[ \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx=\frac {1}{4} \, {\left (\frac {{\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2}}{{\left (\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}\right )} {\left (d x + c - 1\right )}} - \frac {2 \, b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d^{2}} + \frac {2 \, b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d^{2}} + \frac {2 \, {\left (\frac {2 \, {\left (d x + c + 1\right )} a b e}{d x + c - 1} + \frac {{\left (d x + c + 1\right )} b^{2} e}{d x + c - 1} - b^{2} e\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}} + \frac {4 \, {\left (\frac {{\left (d x + c + 1\right )} a^{2} e}{d x + c - 1} + \frac {{\left (d x + c + 1\right )} a b e}{d x + c - 1} - a b e\right )}}{\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}}\right )} {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )} \]

input
integrate((d*e*x+c*e)*(a+b*arctanh(d*x+c))^2,x, algorithm="giac")
 
output
1/4*((d*x + c + 1)*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1))^2/(((d*x + c + 
1)^2*d^2/(d*x + c - 1)^2 - 2*(d*x + c + 1)*d^2/(d*x + c - 1) + d^2)*(d*x + 
 c - 1)) - 2*b^2*e*log(-(d*x + c + 1)/(d*x + c - 1) + 1)/d^2 + 2*b^2*e*log 
(-(d*x + c + 1)/(d*x + c - 1))/d^2 + 2*(2*(d*x + c + 1)*a*b*e/(d*x + c - 1 
) + (d*x + c + 1)*b^2*e/(d*x + c - 1) - b^2*e)*log(-(d*x + c + 1)/(d*x + c 
 - 1))/((d*x + c + 1)^2*d^2/(d*x + c - 1)^2 - 2*(d*x + c + 1)*d^2/(d*x + c 
 - 1) + d^2) + 4*((d*x + c + 1)*a^2*e/(d*x + c - 1) + (d*x + c + 1)*a*b*e/ 
(d*x + c - 1) - a*b*e)/((d*x + c + 1)^2*d^2/(d*x + c - 1)^2 - 2*(d*x + c + 
 1)*d^2/(d*x + c - 1) + d^2))*((c + 1)*d - (c - 1)*d)
 
3.1.17.9 Mupad [B] (verification not implemented)

Time = 4.53 (sec) , antiderivative size = 432, normalized size of antiderivative = 4.55 \[ \int (c e+d e x) (a+b \text {arctanh}(c+d x))^2 \, dx=x\,\left (a\,e\,\left (b+3\,a\,c\right )-2\,a^2\,c\,e\right )+{\ln \left (1-d\,x-c\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )-\ln \left (1-d\,x-c\right )\,\left (\ln \left (c+d\,x+1\right )\,\left (\frac {b^2\,c\,e\,x}{2}-\frac {\frac {b^2\,e}{2}-\frac {b^2\,c^2\,e}{2}}{2\,d}+\frac {b^2\,d\,e\,x^2}{4}\right )-\frac {x\,\left (4\,b^2\,d^2\,e\,\left (c-1\right )-4\,b^2\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )+8\,b^2\,c\,d^2\,e\right )}{16\,d^2}+\frac {x\,\left (8\,b\,d^2\,e\,\left (4\,a\,c-2\,a+b\,c\right )+4\,b\,d^2\,e\,\left (4\,a+b\right )\,\left (c+1\right )-4\,b\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )\,\left (4\,a+b\right )\right )}{16\,d^2}-\frac {b^2\,d\,e\,x^2}{8}+\frac {b\,d\,e\,x^2\,\left (4\,a+b\right )}{8}\right )+{\ln \left (c+d\,x+1\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )+\frac {\ln \left (c+d\,x+1\right )\,\left (e\,b^2\,c+e\,b^2+a\,e\,b\,c^2-a\,e\,b\right )}{2\,d}+\frac {\ln \left (c+d\,x-1\right )\,\left (-e\,b^2\,c+e\,b^2-a\,e\,b\,c^2+a\,e\,b\right )}{2\,d}+d\,\ln \left (c+d\,x+1\right )\,\left (\frac {x\,\left (e\,b^2+2\,a\,c\,e\,b\right )}{2\,d}+\frac {a\,b\,e\,x^2}{2}\right )+\frac {a^2\,d\,e\,x^2}{2} \]

input
int((c*e + d*e*x)*(a + b*atanh(c + d*x))^2,x)
 
output
x*(a*e*(b + 3*a*c) - 2*a^2*c*e) + log(1 - d*x - c)^2*((b^2*c*e*x)/4 - (b^2 
*e - b^2*c^2*e)/(8*d) + (b^2*d*e*x^2)/8) - log(1 - d*x - c)*(log(c + d*x + 
 1)*((b^2*c*e*x)/2 - ((b^2*e)/2 - (b^2*c^2*e)/2)/(2*d) + (b^2*d*e*x^2)/4) 
- (x*(4*b^2*d^2*e*(c - 1) - 4*b^2*d*e*(d*(c - 1) + d*(c + 1)) + 8*b^2*c*d^ 
2*e))/(16*d^2) + (x*(8*b*d^2*e*(4*a*c - 2*a + b*c) + 4*b*d^2*e*(4*a + b)*( 
c + 1) - 4*b*d*e*(d*(c - 1) + d*(c + 1))*(4*a + b)))/(16*d^2) - (b^2*d*e*x 
^2)/8 + (b*d*e*x^2*(4*a + b))/8) + log(c + d*x + 1)^2*((b^2*c*e*x)/4 - (b^ 
2*e - b^2*c^2*e)/(8*d) + (b^2*d*e*x^2)/8) + (log(c + d*x + 1)*(b^2*e - a*b 
*e + b^2*c*e + a*b*c^2*e))/(2*d) + (log(c + d*x - 1)*(b^2*e + a*b*e - b^2* 
c*e - a*b*c^2*e))/(2*d) + d*log(c + d*x + 1)*((x*(b^2*e + 2*a*b*c*e))/(2*d 
) + (a*b*e*x^2)/2) + (a^2*d*e*x^2)/2